package com.huawei.appmarket.service.infoflow.card;

import android.content.Context;
import android.widget.TextView;
import androidx.databinding.ViewDataBinding;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.infoflow.bean.InfoFlowContentCardBean;
import com.huawei.appmarket.service.infoflow.cards.card.BaseInfoFlowCard;
import java.util.ArrayList;
import java.util.List;
import o.dof;
import o.ewy;

public class InfoFlowContentCard extends BaseInfoFlowCard<ewy> {
    public /* synthetic */ void ˊ(ViewDataBinding viewDataBinding) {
        ˏ((ewy) viewDataBinding);
    }

    public InfoFlowContentCard(Context context) {
        super(context);
    }

    public void ˏ(ewy o_ewy) {
        super.ˊ(o_ewy);
        ˏ(((ewy) ʾ()).ॱ);
        ॱ(((ewy) ʾ()).ॱॱ);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (cardBean instanceof InfoFlowContentCardBean) {
            InfoFlowContentCardBean infoFlowContentCardBean = (InfoFlowContentCardBean) cardBean;
            if (dof.ˋ(infoFlowContentCardBean.ॱ())) {
                ((ewy) ʾ()).ʼ.setVisibility(4);
                ((ewy) ʾ()).ᐝ.setVisibility(4);
            } else {
                ((ewy) ʾ()).ʼ.setText(infoFlowContentCardBean.ॱ());
                ((ewy) ʾ()).ʼ.setVisibility(0);
                ((ewy) ʾ()).ᐝ.setVisibility(0);
            }
            List arrayList = new ArrayList(3);
            arrayList.add(0, ((ewy) ʾ()).ˏ);
            arrayList.add(1, ((ewy) ʾ()).ˋ);
            arrayList.add(2, ((ewy) ʾ()).ʻ);
            for (int i = 0; i < arrayList.size(); i++) {
                if (i < infoFlowContentCardBean.ˊ().size()) {
                    ((TextView) arrayList.get(i)).setText((String) infoFlowContentCardBean.ˊ().get(i));
                } else {
                    ((TextView) arrayList.get(i)).setText("");
                }
            }
        }
    }
}
